package com.sgcc.pda.data.util.db;

import android.content.Context;

import com.sgcc.pda.data.dao.ExceptionDao;
import com.sgcc.pda.data.dao.impl.ExceptionDaoImpl;

/**
 * 错误信息工具类.
 *
 * @author 王沛栋
 * @data 2018/1/12 15:59
 */

public class ExceptionInfoUtil {

    static ExceptionDao exceptionDao;

    private static ExceptionDao getExceptionDao() {
        if (exceptionDao == null) {
            exceptionDao = new ExceptionDaoImpl();
        }
        return exceptionDao;
    }

    /**
     * 保存错误信息
     *
     * @param context
     * @param userid
     * @param detail
     * @param data
     * @param status
     * @param etype
     * @return
     */
    public static boolean saveExceptionInfo(Context context, String userid,
                                            String detail, String data,
                                            String status, String etype) {
        return getExceptionDao().saveExceptionInfo(context, userid, detail, data, status, etype);
    }
}
